package com.mhys.hms.service.user.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.mhys.hms.entity.Recruit;
import com.mhys.hms.mapper.RecrManagerMapper;
import com.mhys.hms.service.user.RecrManagerService;

/**
 * 招聘管理业务类
 * @author cuidukang
 *
 */
@Service
public class RecrManagerServiceImpl implements RecrManagerService{
	@Autowired
	private RecrManagerMapper recrManagerMapper;
	
	/**
	 * 分页模糊查询
	 */
	@Override
	public List<Recruit> getRecrInfo(int pageSize, int pageNumber, String recruitJob, String education) {
		int startNum = (pageNumber - 1)*pageSize;
		return recrManagerMapper.getRecrInfo(startNum, pageSize, recruitJob, education);
	}
	/**
	 * 查询总条数
	 */
	@Override
	public int getRecrTotalNum(String recruitJob, String education) {
		return recrManagerMapper.getRecrTotalNum(recruitJob, education);
	}
	/**
	 * 根据id查询招聘信息
	 */
	@Override
	public List<Recruit> getRecrById(Integer recrId) {
		return recrManagerMapper.getRecrById(recrId);
	}
	/**
	 * 逻辑删除
	 */
	@Override
	public Integer deleteRecrById(int recrId) {
		return recrManagerMapper.deleteRecrById(recrId);
	}
	
	/**
	 * 新增招聘数据
	 */
	@Override
	public Integer addRecrInfo(Recruit recr) {
		return recrManagerMapper.addRecrInfo(recr);
	}
}
